<?php
//include_once "../qc_base.php";
//include_once "../qc_utils.php";
//include_once "../bootstrap.php";
//include_once "../lib/phpctls/PhpCtls.php";


	$q = Doctrine_Query::create()
	->from('Projects p');
	$ar_projects = $q->execute()->toArray();	

	
	$ar_selections = array(array('showvalue'=>'Select Project','keyvalue'=>''));
	
	
	foreach($ar_projects AS $ar_project){
		$ar_selection['showvalue'] = $ar_project['project_name'];
		$ar_selection['keyvalue'] = $ar_project['project_id'];
		$ar_selections[] = $ar_selection;
	}
	
	
$ctl_SelectProject = new CtlSelect(array('name'=>'project_id', 'id'=>'project_id', 'set_on_change'=>'this.submit()'),
$project_id, $ar_selections);
print $ctl_SelectProject->render();	
	
?>